package cn.iocoder.springboot.lab03.kafkademo.common.parser;

import lombok.extern.slf4j.Slf4j;

/**
 * @Author：YH
 * @Description：
 * @Date:Created in 2023/12/23 23:12
 */
@Slf4j
public abstract class AbstractJsonParser implements JsonParser {


    @Override
    public boolean supports() {
        try {
            Class<?> aClass = Class.forName(getMapperClassName());
            return true;
        } catch (ClassNotFoundException e) {
            log.error("[AbstractJsonParser].supports error", e);
            return false;
        }
    }
    
    protected abstract String getMapperClassName();
}
